From: Florian Müllner Date: Fri, 19 Oct 2012 17:58:05 +0000 (+0200) Subject: workspacesView: Fix updating when number of workspaces changes X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~5565 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a2b1946b01c4ef0c21f9babddc4b5b26ed69b394;p=gnome-shell.git workspacesView: Fix updating when number of workspaces changes Ouch. This went unnoticed for a long time as by default (using dynamic workspaces) only one workspace is added at a time, which happens to work fine. https://bugzilla.gnome.org/show_bug.cgi?id=686487 --- diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js index c5c1e672e..c9e83a9c8 100644 --- a/js/ui/workspacesView.js +++ b/js/ui/workspacesView.js @@ -935,9 +935,10 @@ const WorkspacesDisplay = new Lang.Class({ // Assume workspaces are only added at the end for (let w = oldNumWorkspaces; w < newNumWorkspaces; w++) { let metaWorkspace = global.screen.get_workspace_by_index(w); - this._workspaces[m++][w] = + this._workspaces[m][w] = new Workspace.Workspace(metaWorkspace, i); } + m++; } this._thumbnailsBox.addThumbnails(oldNumWorkspaces, newNumWorkspaces - oldNumWorkspaces);